﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:View="clr-namespace:It3xl.FormattedInput.View;assembly=It3xl.FormattedInput"
	xmlns:ViewModel="clr-namespace:It3xl.Scaffold.MoneyField.Silverlight.ViewModel"
	x:Class="It3xl.Scaffold.MoneyField.Silverlight.ManualTestPage"
	
	
	mc:Ignorable="d"
	d:DesignHeight="300"
	d:DesignWidth="400"
	>

	
	<UserControl.DataContext>
		<ViewModel:ViewModelForTests/>
	</UserControl.DataContext>
	
	
	<UserControl.Resources>
	</UserControl.Resources>
	

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="282"/>
			<RowDefinition/>
		</Grid.RowDefinitions>

		<StackPanel>

			<Border BorderThickness="2" BorderBrush="LightSteelBlue" Background="Lavender" Margin="2" Padding="2">
				<StackPanel>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="TextBox + Nullable{Double}"/>
						<TextBox Margin="2" Text="{Binding DoubleNullableMoney, Mode=TwoWay}" Background="WhiteSmoke" BorderThickness="0" MinWidth="400"/>
					</StackPanel>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="MoneyTextBox + Nullable{Double}"/>
						<View:MoneyTextBox
							Text="{Binding DoubleNullableMoney, ConverterParameter=DoubleNullableMoney}"
				
							DecimalSeparatorChar = ','
							DecimalSeparatorAlternativeChar = '.'
							GroupSeparatorChar = ' '
							GroupSeparatorDisabledOnInput="True"
				
							x:Name="DoubleNullableMoney"
							Margin="2"
							BorderBrush="LightSteelBlue"
							BorderThickness="2"
							MinWidth="400"
						/>
					</StackPanel>
					
					<Grid Margin="2"/>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="TextBox + Double"/>
						<TextBox Margin="2" Text="{Binding DoubleMoney, Mode=TwoWay}" Background="WhiteSmoke" BorderThickness="0" MinWidth="400"/>
					</StackPanel>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="MoneyTextBox + Double"/>
						<View:MoneyTextBox
							Text="{Binding DoubleMoney, ConverterParameter=DoubleMoney}"
				
							DecimalSeparatorChar = ','
							DecimalSeparatorAlternativeChar = '.'
							GroupSeparatorChar = ' '
							GroupSeparatorDisabledOnInput="True"
						
							x:Name="DoubleMoney"
							Margin="2"
							BorderBrush="SteelBlue"
							BorderThickness="2"
							MinWidth="400"
						/>
					</StackPanel>
					
				</StackPanel>
			</Border>


			<!--<Border BorderThickness="2" BorderBrush="LightGreen" Background="LightYellow" Margin="2" Padding="2">
				<StackPanel>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="TextBox + Nullable{Decimal}"/>
						<TextBox Margin="2" Text="{Binding DecimalNullableMoney, Mode=TwoWay}" Background="WhiteSmoke" BorderThickness="0" MinWidth="400"/>
					</StackPanel>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="MoneyTextBox + Nullable{Decimal}"/>
						<View:MoneyTextBox
							Text="{Binding DecimalNullableMoney, ConverterParameter=DecimalNullableMoney}"
				
							DecimalSeparatorChar = ','
							DecimalSeparatorAlternativeChar = '.'
							GroupSeparatorChar = ' '
				
							x:Name="DecimalNullableMoney"
							Margin="2"
							BorderBrush="LightSteelBlue"
							BorderThickness="2"
							MinWidth="400"
						/>
					</StackPanel>

					<Grid Margin="2"/>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="TextBox + Decimal"/>
						<TextBox Margin="2" Text="{Binding DecimalMoney, Mode=TwoWay}" Background="WhiteSmoke" BorderThickness="0" MinWidth="400"/>
					</StackPanel>

					<StackPanel Orientation="Horizontal">
						<TextBlock Text="MoneyTextBox + Decimal"/>
						<View:MoneyTextBox
							Text="{Binding DecimalMoney, ConverterParameter=DecimalMoney}"
				
							DecimalSeparatorChar = ','
							DecimalSeparatorAlternativeChar = '.'
							GroupSeparatorChar = ' '
				
							x:Name="DecimalMoney"
							Margin="2"
							BorderBrush="SteelBlue"
							BorderThickness="2"
							MinWidth="400"
						/>
					</StackPanel>
				</StackPanel>
			</Border>-->
			
			<StackPanel Orientation="Horizontal">
				<Button Margin="2" Content="Set Randov Value" Click="SetAmountRandomButton_Click" />
				<Button Margin="2" Content="Set Default Value" Click="SetDefaultValueButton_Click" />
				<Button Margin="2" Content="Set Negative Value" Click="SetNegativeValueButton_Click" />
				<Button Margin="2" Content="Change ViewModel" Click="ChangeViewModelButton_Click" />
				<Button Margin="2" Content="Clear Log" Click="ClearLog_Click" />
			</StackPanel>
			
		</StackPanel>

		<ScrollViewer Grid.Row="1">
			<ItemsControl Margin="2" x:Name="LogItemsControl"/>
		</ScrollViewer>
		
	</Grid>

</UserControl>
